//
//  LiWuShuoCell.m
//  BeautyClother
//
//  Created by dllo on 15/9/18.
//  Copyright (c) 2015年 宋爽. All rights reserved.
//

#import "LiWuShuoCell.h"

@implementation LiWuShuoCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.image = [[UIImageView alloc] init];
        [self.contentView addSubview:_image];
        [_image release];
        
        self.label = [[UILabel alloc] init];
        [self.image addSubview:_label];
        [_label release];
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    
    CGFloat offwidth = [UIScreen mainScreen].bounds.size.width / 375;
    CGFloat offheight = [UIScreen mainScreen].bounds.size.height / 667;
    CGFloat width = self.contentView.frame.size.width;
    
    CGFloat height = self.contentView.frame.size.height;
    
    self.image.frame = CGRectMake(5, 5, width - 10, height - 10);
    self.image.layer.cornerRadius = 5;
    self.image.layer.masksToBounds = YES;
    
    self.label.frame = CGRectMake(0, 110 * offheight, self.image.frame.size.width, 30 * offheight);
    self.label.backgroundColor = [UIColor colorWithRed:0.1 green:0.1 blue:0.1 alpha:0.3];
    self.label.textColor = [UIColor whiteColor];
   self.label.textAlignment = 1;
   self.label.font = [UIFont systemFontOfSize:18];
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
